package com.bluesky.plum.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bluesky.plum.richdomain.RichDomainField;

public class IndexedMap<K, V> {
	private List<V> list = new ArrayList<V>();
	private Map<K, V> map = new HashMap<K, V>();

	

	public List<V> getList() {
		return list;
	}

	public void setList(List<V> list) {
		this.list = list;
	}

	public Map<K, V> getMap() {
		return map;
	}

	public void setMap(Map<K, V> map) {
		this.map = map;
	}

	public void put(K key, V value) {
		list.add(value);
		map.put(key, value);
				
	}
	
	public void clear(){
		list.clear();
		map.clear();
	}

	public V get(K key) {
		return map.get(key);
	}
	
	
}
